const common = require('../../utils/common')
const { queryShopLeadAuditCount } = require('../../services/stores')
Page({
  data: {
    approveCount: 0,
    rejectCount: 0
  },
  onLoad: function () {
    this.getData()
  },
  getData() {
    queryShopLeadAuditCount().then((res) => {
      const { approveCount, rejectCount } = res.data
      this.setData({
        approveCount,
        rejectCount,
      })
    }).catch(err => {
      common.log(err)
    })
  },
  goNewStore() {
    wx.navigateTo({ url: `/pages/new-store/index` })
  },
  goRejectedList() {
    wx.navigateTo({ url: `/pages/rejected-list/index` })
  }
})
